import { Link } from 'umi';
import s from './index.less';
// import { Helmet } from 'react-helmet'; //头信息
export default function(props) {
  return (
    <div className={s.app} id="app">
      {/* <header className={styles.normal}>
        <h1 className={styles.title}>UmiJs</h1>
      </header> */}
      {/* <Helmet>
        <meta charSet="utf-8" />
        <meta name="keywords" content="我的应用" />
      </Helmet> */}
      {props.children}
      <div className={s.home}>
        <Link to="/">返回首页</Link>
      </div>
    </div>
  );
}

// import { Component } from 'react';
// import withRouter from 'umi/withRouter';
// console.log(1)
// class Layout extends Component {
//   componentDidUpdate(prevProps) {
//     if (this.props.location !== prevProps.location) {
//       window.scrollTo(0, 0);
//     }
//   }
//   render() {
//     return this.props.children;
//   }
// }
// export default withRouter(Layout);
